package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 产品品类实体类
 *
 * @author 吴旭
 */
public class ProductTypeEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 3783442404441733189L;

    private Long TypeId;
    private String ProductTypeNo;
    private String ProductTypeName;
    private String Description;

    public Long getTypeId() {
        return TypeId;
    }

    public String getProductTypeNo() {
        return ProductTypeNo;
    }

    public String getProductTypeName() {
        return ProductTypeName;
    }

    public String getDescription() {
        return Description;
    }

    public void setTypeId(Long TypeId) {
        this.TypeId = TypeId;
    }

    public void setProductTypeNo(String ProductTypeNo) {
        this.ProductTypeNo = ProductTypeNo;
    }

    public void setProductTypeName(String ProductTypeName) {
        this.ProductTypeName = ProductTypeName;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ProductTypeEntity)) {
            return false;
        }

        final ProductTypeEntity that = (ProductTypeEntity) o;

        return new EqualsBuilder()
                .append(this.getTypeId(), that.getTypeId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getTypeId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
